AI modified/generated indicator in file rights - #2478
Merged
Conversation
Files can be marked as AI generated or AI modified following the EU icons for labelling AI-generated content. The free form text input explains which parts of the file were generated or modified. Separators group the inputs, which the settings dialog has grown too many of to read as one list.
The official icons must not be restyled by themes, so they are not registered as theme icons. Their view boxes are cropped to the mark, which leaves the space around it to stylesheets instead of the clear space that differs per icon. The letter color is exposed as custom property since the badge follows the surrounding text color. Since the icons render the wording as graphic, they carry the translated label as alt text.
Items combine label, rights, license and AI indicator, so that the widgets do not have to lay out both kinds of information themselves. Data attributes mark which items carry rights, where labels are and which parts an item consists of, since widget stylesheets cannot address the hashed class names of another CSS module. Laying out the parts as wrapping flex items makes narrow columns break between them instead of separating an icon from the text that explains it, and leaves no indent in front of a part that moved to its own line.
Both icons share one button so that they appear as one marker and the tooltip covers rights and AI information alike. The copyright icon comes last to stay aligned with the tooltip arrow. Only the basic AI symbol is used since the tooltip spells out the wording. Keeping items from wrapping only inside their parts lets rights and AI information sit side by side or stack, and leaves the scroller for parts that are too wide on their own. Since only the button follows the surrounding text color, the letters of the marks are inverted there alone: the tooltip is dark in any case.
The copyright sign now only precedes items that actually carry rights and belongs to that part, so it stays with the rights when the AI indicator moves to its own line. Addressing the label via data attribute keeps the rule that hides it for single items independent of which other elements an item contains.
Content elements opt in per element, so that a representative subset renders the indicators. Each of them gets its own story next to the one without indicators to keep both cases covered. The kind of indicator differs per file collection, which puts both pills next to each other in stories of elements that combine a media file with a poster image.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.